import React , {Component}from 'react';
import { Modal, Button } from 'antd';
import InputBox from '../../common/InputBox.js'
import Confirm from '../../common/Confirm'
/*系统后台>用户管理>用户列表>新建用户*/

export default class Createuser extends React.Component {
    constructor(props){
        super(props);
        this.state = { visible: false }
        this.Style={};
    }

    componentWillMount() {
        this.Style.createuserview={
            textAlign:"center",
            display:"block",
            border:"3px solid green"
        }
        this.Style.createuserview.width = 400;
        this.Style.createuserview.height = 200;
        this.Style.createuserview.fontSize = 30;

        this.Style.createuserview={
            width:"634px",
            height:"44px",
            paddingLeft:"18px",
            lineHeight:"44px",
            display:"block",
            background:"#f2f2f2",
            marginBottom:49
        }
    }

    state = { visible: false }
    showModal = () => {
        this.setState({
            visible: true,
        });
    }
    handleOk = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }
    handleCancel = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }

    createuser(){

    }

    render(){
        return (
            <div>
                <Button  type="primary" onClick={this.showModal} >部门</Button>
                <Modal visible={this.state.visible} onOk={this.handleOk} onCancel={this.handleCancel} style={{width:"634px",height:"240px",display:"block"}} title={"创建用户"}>
                    <InputBox defaultvalute="请输入手机号" titletext="手机号" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                    <InputBox defaultvalute="请输入姓名" titletext="姓名" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                    <InputBox type="password" defaultvalute="请输入密码" titletext="密码" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                    <Confirm tcontext="创建用户" style={{width:130,height:30,display:"block",color:"#fff",fontSize:"16px",marginTop:60,marginLeft:220}} touch={this.createuser.bind(this)}/>
                    <span style={{position:"absolute",left:470,top:6}}>(用作登陆账号)</span>
                </Modal>
            </div>
        )
    }
}





